Skip to main content

Print error recovery flow (code = 15)

code = 15 means print stage failed (printError may contain printer-specific reason), but business operation can already be committed. This applies to /sale, /refund, /close_shift, /deposit, /withdraw. For /x_report, /dates_report and /check_copy, the same print failure currently surfaces with a different code (-1 or absent) — see §8.1 — so trigger this same recovery flow whenever printError is non-null, not only when code = 15.

Recommended flow:

  1. Receive error response with code = 15.
  2. Save documentExtID and full response payload to incident log.
  3. Call /check_status for the same document.
  4. If docStatus = 1, treat payment/fiscal operation as completed and recover only printing:
    • call /check_copy (requires documentID) after printer issue is resolved.
  5. If docStatus = 0, continue polling /check_status.
  6. If document is still not found in an unknown-delivery scenario, resend same operation with same documentExtID.